$(document).ready(function () {

   $("#vali").validate({
	
                      errorClass:'showerror',

		
    });
	
	
    
	$('.category').each(function() {
        $(this).rules('add', {
            required: true,
            messages: {
                required:  "<li>Please select Category</li>", 
            }
        });
    });
	
    $('.name').each(function() {
        $(this).rules('add', {
            required: true,
            messages: {
                required:  "<li>Please enter Name</li>",
            }
        });
    });
	
	  $('.file_location').each(function() {
        $(this).rules('add', {
            required: true,
            messages: {
                required:  "<li>Please enter Location</li>",
            }
        });
    });
	
	$('.username').each(function() {
        $(this).rules('add', {
            required: true,
            messages: {
                required:  "<li>Please enter Username</li>",
            }
        });
    });
	
	  $('.hdd').each(function() {
        $(this).rules('add', {
             required: true,
            messages: {
                  required:  "<li>Please select hdd</li>",
            }
        });
    });
	
	
});